<script type="text/javascript">
	$('#id_floor').change(function(){
		buildTree(analysisType, 'none');
		sessvars.sessionObj['floorId'] = $(this).val();
	})
	if ($('#id_floor').length != 0){
		if (typeof sessvars.sessionObj['floorId'] == 'undefined'){sessvars.sessionObj['floorId'] = $('#id_floor').find("option:selected").val();}
		//if (sessvars.sessionObj['floorId'] == ""){sessvars.sessionObj['floorId'] = $('select#id_floor').find("option:selected").val();}
		else {
			for (var i=0;i<document.getElementById('id_floor').options.length;i++) {
				if (document.getElementById('id_floor').options[i].value == sessvars.sessionObj['floorId'])
					{document.getElementById('id_floor').options[i].selected = true;}
			}
		}
	}
</script>

<form id='floorForm' class="form-inline" style="margin-bottom: 5px">
<label class="control-label" style="font-size: 11px">Choose floor: &nbsp;</label>
{% load widget_tweaks %}
{{ flr_model.management_form }}
{{ flr_model.floor|add_class:"span1"}}
</form>